package com.michale.common.properties;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author Michale
 * @apiNote 读取线程池配置信息
 */
@Data
@Component
@ConfigurationProperties(prefix = "thread")
public class ThreadProperties {

    @ApiModelProperty("核心线程池大小 ")
    private int corePoolSize = 50;

    @ApiModelProperty("最大可创建的线程数")
    private int maxPoolSize = 200;

    @ApiModelProperty(" 队列最大长度")
    private int queueCapacity = 1000;

    @ApiModelProperty("线程池维护线程所允许的空闲时间")
    private int keepAliveSeconds = 300;

}
